#ifndef path_h_
#define path_h_
#include <list>
#include <queue>
#include <vector>
#include "pathNode.h"
using std::list;
using std::priority_queue;
using std::vector;

class cmpPQ 
{
  public:
    bool operator()(Node* & x, Node* & y)
    {
        return *y < *x;
    }
};


class Path {

  public:
    //CONSTRUCTORS
    Path(int w, int h);
    ~Path();

    //ACCESSORS
    int getw();
    int geth();
    bool getPath(int startx, int starty, int endx, int endy, list<int> & ret);
    list<Node*> getAdj(int x, int y, priority_queue<Node*, vector<Node*>, cmpPQ> & closed);
    bool contained(Node & n, priority_queue<Node*, vector<Node*>, cmpPQ> l);
    Node* getLowest(list<Node*> & l);
    int getCost(Node* parent, Node* child);
    int getDir(Node* parent, Node* child);
    bool iscanDiag(int x, int y, int a, int b);

    //MODIFIERS
    //OPERATORS

    //OTHER
    void printPath(list<int> & retpath, int startx, int starty, int endx, int endy);
    Node** data; //move to private later and write accessors/modifiers

  private:
    int width;
    int height;
    priority_queue<Node*, vector<Node*>, cmpPQ> open;
    priority_queue<Node*, vector<Node*>, cmpPQ> closed;
    //Node** data;

};


#endif
